﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Himall.Core;
using Himall.IServices;
using Himall.IServices.QueryModel;
using Himall.Model;
using Himall.Entity;

namespace Himall.Application
{
   public   class ManagerApplication
    {
        private static IManagerService _iManagerService = ObjectContainer.Current.Resolve<IManagerService>();

        /// <summary>
        /// 添加一个商家管理员
        /// </summary>
        /// <param name="password">密码</param>
        /// <param name="username">用户名</param>
        public static ManagerInfo AddSellerManager(string username, string password, string salt)
        {
           return  _iManagerService.AddSellerManager(username, password, salt);
        }


        /// <summary>
        /// 是否存在相同的用户名
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public static bool CheckUserNameExist(string userName, bool isPlatFormManager = false)
        {
           return   _iManagerService.CheckUserNameExist(userName, isPlatFormManager);
        }

    }
}
